package com.zfzs.post.modules.agent.service;

import com.zfzs.post.modules.agent.domain.AgentVerified;
import com.zfzs.post.modules.agent.service.dto.AgentVerifiedDTO;
import com.zfzs.post.modules.agent.service.dto.AgentVerifiedQueryCriteria;
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @author ck
* @date 2019-09-05
*/
//@CacheConfig(cacheNames = "agentVerified")
public interface AgentVerifiedService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    Object queryAll(AgentVerifiedQueryCriteria criteria, Pageable pageable);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    public Object queryAll(AgentVerifiedQueryCriteria criteria);

    /**
     * findById
     * @param id
     * @return
     */
    //@Cacheable(key = "#p0")
    AgentVerified findById(Long id);

    /**
     * 根据agentId获取验证信息
     * @param id
     * @return
     */
    AgentVerified findByAgentId(Long id);

    /**
     * create
     * @param resources
     * @return
     */
    //@CacheEvict(allEntries = true)
    AgentVerified create(AgentVerified resources);

    /**
     * update
     * @param resources
     */
    //@CacheEvict(allEntries = true)
    void update(AgentVerified resources);

    /**
     * delete
     * @param id
     */
    //@CacheEvict(allEntries = true)
    void delete(Long id);

    /**
     * 根据姓名查询
     * @param name
     * @return
     */
    List<AgentVerified> findByName(String name);
}